import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import {URL, fileURLToPath} from "node:url"
import vueJsxPlugin from '@vitejs/plugin-vue-jsx'

// https://vitejs.dev/config/
const additionalDatas:string = `
  @import "@/assets/css/global.scss";
  @import "@/assets/css/initial.scss";
`

export default defineConfig({
  plugins: [vue(), vueJsxPlugin()],
  resolve: {
    alias: {
      "@": fileURLToPath(new URL("./src", import.meta.url))
    }
  },
  css: {
    preprocessorOptions: {
      scss: {
        additionalData: additionalDatas
      }
    }
  },
  server: {
    host: true,
    port: 4000,
    strictPort:true,
    open: true,
  }
})
